<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
	<meta name="format-detection" content="telephone=no, address=no, email=no">
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="x5-orientation" content="portrait">
	<title>宝贝转转来 </title>
	<link href="css/qui.css" rel="stylesheet" >
	<link href="css/style.css" rel="stylesheet" >
	<script src="js/jquery-1.10.1.min.js"></script>
	<script type="text/javascript" src="js/awardRotate.js"></script>
	<script type="text/javascript">
	$(function (){
	
		var rotateTimeOut = function (){
			$('#rotate').rotate({
				angle:0,
				animateTo:2160,
				duration:8000,
				callback:function (){
					alert('网络超时，请检查您的网络设置！');
				}
			});
		};
		var bRotate = false;
	
		var rotateFn = function (awards, angles, txt){
			bRotate = !bRotate;
			$('#rotate').stopRotate();
			$('#rotate').rotate({
				angle:0,
				animateTo:angles+1800,
				duration:8000,
				callback:function (){
					alert(txt);
					bRotate = !bRotate;
				}
			})
		};
	
		$('.pointer').click(function (){
	
			if(bRotate)return;
			var item = rnd(0,7);
	
			switch (item) {
				case 0:
					//var angle = [26, 88, 137, 185, 235, 287, 337];
					rotateFn(0, 22, '1-10元宝');
					break;
				case 1:
					//var angle = [88, 137, 185, 235, 287];
					rotateFn(1, 68, '2017款五菱汽车');
					break;
				case 2:
					//var angle = [137, 185, 235, 287];
					rotateFn(2, 113, '平板电脑');
					break;
				case 3:
					//var angle = [137, 185, 235, 287];
					rotateFn(3, 158, '香烟经典一条');
					break;
				case 4:
					//var angle = [185, 235, 287];
					rotateFn(4, 203, '猜猜猜');
					break;
				case 5:
					//var angle = [185, 235, 287];
					rotateFn(5, 248, '话费20-50元');
					break;
				case 6:
					//var angle = [235, 287];
					rotateFn(6, 293, '随机产品');
					break;
				case 7:
					//var angle = [287];
					rotateFn(7, 338, '积分8-288');
					break;
			}
	
			console.log(item);
		});
	});
	function rnd(n, m){
		return Math.floor(Math.random()*(m-n+1)+n)
	}
	</script>
</head>
<body style="overflow-y:auto;">
	<div class="warp-page">
		<div class="zhuan-bg">
			<div class="zhuan-box" id="rotate">
				<div class="xuan xuan01"><p>积分8-288</p><img src="images/xuan01.png" /></div>	
				<div class="xuan xuan02"><p>随机产品</p><img src="images/xuan02.png" /></div>	
				<div class="xuan xuan03"><p>话费<br />20-50元</p><img src="images/xuan03.png" /></div>	
				<div class="xuan xuan04"><p>猜猜猜</p><img src="images/xuan04.png" /></div>	
				<div class="xuan xuan05"><p>香烟<br />经典一条</p><img src="images/xuan05.png" /></div>	
				<div class="xuan xuan06"><p>平板电脑</p><img src="images/xuan06.png" /></div>	
				<div class="xuan xuan07"><p>2017款<br />五菱汽车</p><img src="images/xuan07.png" /></div>	
				<div class="xuan xuan08"><p>1-10元宝</p><img src="images/xuan08.png" /></div>	
			</div>
			<div class="pointer"><img src="images/clicks.png" alt="pointer"/></div>
		</div>
		<div class="btn-box">
			<div class="row no-gutter">
				<div class="col-4"><a href="#" class="a-btn">1元宝</a></div>
				<div class="col-4"><a href="#" class="a-btn">5元宝</a></div>
				<div class="col-4"><a href="#" class="a-btn">10元宝</a></div>
			</div>
		</div>
	</div>
</body>

</html>